<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>C++ Web Framework: Session Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">C++ Web Framework
   &#160;<span id="projectnumber">3.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="class_session-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Session Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>The <a class="el" href="class_session.html" title="The Session class holds information about a client session. ">Session</a> class holds information about a client session.  
 <a href="class_session.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="session_8h_source.html">session.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a06554b019fe2f90aec2868ebb350c69e"><td class="memItemLeft" align="right" valign="top"><a id="a06554b019fe2f90aec2868ebb350c69e"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_session.html#a06554b019fe2f90aec2868ebb350c69e">Session</a> (const QString &amp;id, qint64 sessionTimeOut)</td></tr>
<tr class="memdesc:a06554b019fe2f90aec2868ebb350c69e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a session with a unique identifier. <br /></td></tr>
<tr class="separator:a06554b019fe2f90aec2868ebb350c69e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c4e4bd7aa6d6fb16ab3dcdb5e892783"><td class="memItemLeft" align="right" valign="top">QObject *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_session.html#a8c4e4bd7aa6d6fb16ab3dcdb5e892783">getAttribute</a> (const QString &amp;name) const noexcept</td></tr>
<tr class="memdesc:a8c4e4bd7aa6d6fb16ab3dcdb5e892783"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a session attribute given a name.  <a href="#a8c4e4bd7aa6d6fb16ab3dcdb5e892783">More...</a><br /></td></tr>
<tr class="separator:a8c4e4bd7aa6d6fb16ab3dcdb5e892783"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ca0e9626f0b14957436f9e36cb1b65b"><td class="memItemLeft" align="right" valign="top"><a id="a1ca0e9626f0b14957436f9e36cb1b65b"></a>
QStringList&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_session.html#a1ca0e9626f0b14957436f9e36cb1b65b">getAttributeNames</a> ()</td></tr>
<tr class="memdesc:a1ca0e9626f0b14957436f9e36cb1b65b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a session attribute given a name. <br /></td></tr>
<tr class="separator:a1ca0e9626f0b14957436f9e36cb1b65b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30db82e0a4a27644eafba17b45a648e6"><td class="memItemLeft" align="right" valign="top"><a id="a30db82e0a4a27644eafba17b45a648e6"></a>
qint64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_session.html#a30db82e0a4a27644eafba17b45a648e6">getCreationTime</a> () const noexcept</td></tr>
<tr class="memdesc:a30db82e0a4a27644eafba17b45a648e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">getCreationTime <br /></td></tr>
<tr class="separator:a30db82e0a4a27644eafba17b45a648e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc9bbd9936d3f324fb30c3d6f5a102a7"><td class="memItemLeft" align="right" valign="top"><a id="acc9bbd9936d3f324fb30c3d6f5a102a7"></a>
QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_session.html#acc9bbd9936d3f324fb30c3d6f5a102a7">getId</a> () const</td></tr>
<tr class="memdesc:acc9bbd9936d3f324fb30c3d6f5a102a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the unique id. <br /></td></tr>
<tr class="separator:acc9bbd9936d3f324fb30c3d6f5a102a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abefcd2f77928404263a3583037d892e2"><td class="memItemLeft" align="right" valign="top"><a id="abefcd2f77928404263a3583037d892e2"></a>
qint64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_session.html#abefcd2f77928404263a3583037d892e2">getLastAccessedTime</a> () const noexcept</td></tr>
<tr class="memdesc:abefcd2f77928404263a3583037d892e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the time of the last session access. <br /></td></tr>
<tr class="separator:abefcd2f77928404263a3583037d892e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d4d1f80fdc47692172b3d3e2175df86"><td class="memItemLeft" align="right" valign="top"><a id="a0d4d1f80fdc47692172b3d3e2175df86"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_session.html#a0d4d1f80fdc47692172b3d3e2175df86">validate</a> ()</td></tr>
<tr class="memdesc:a0d4d1f80fdc47692172b3d3e2175df86"><td class="mdescLeft">&#160;</td><td class="mdescRight">Make a valid session. <br /></td></tr>
<tr class="separator:a0d4d1f80fdc47692172b3d3e2175df86"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc80e67b2310fa99f07528e1a3107a71"><td class="memItemLeft" align="right" valign="top"><a id="abc80e67b2310fa99f07528e1a3107a71"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_session.html#abc80e67b2310fa99f07528e1a3107a71">invalidate</a> () noexcept</td></tr>
<tr class="memdesc:abc80e67b2310fa99f07528e1a3107a71"><td class="mdescLeft">&#160;</td><td class="mdescRight">Make a invalid session. <br /></td></tr>
<tr class="separator:abc80e67b2310fa99f07528e1a3107a71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7fd8e74f40cb93cb23cb9a434c338717"><td class="memItemLeft" align="right" valign="top"><a id="a7fd8e74f40cb93cb23cb9a434c338717"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_session.html#a7fd8e74f40cb93cb23cb9a434c338717">removeAttribute</a> (const QString &amp;name) noexcept</td></tr>
<tr class="memdesc:a7fd8e74f40cb93cb23cb9a434c338717"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes all the items that have the key key from the map. Returns the number of items removed which is usually 1 but will be 0 if the key isn't in the map, or &gt; 1 if insertMulti() has been used with the key. <br /></td></tr>
<tr class="separator:a7fd8e74f40cb93cb23cb9a434c338717"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe6cfc02c901d3f27924107067f83189"><td class="memItemLeft" align="right" valign="top"><a id="afe6cfc02c901d3f27924107067f83189"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_session.html#afe6cfc02c901d3f27924107067f83189">addAttribute</a> (const QString &amp;name, QObject *value) noexcept</td></tr>
<tr class="memdesc:afe6cfc02c901d3f27924107067f83189"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method add an attribute to the session. <br /></td></tr>
<tr class="separator:afe6cfc02c901d3f27924107067f83189"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b0c748a2347e6fbf9db640ebf552433"><td class="memItemLeft" align="right" valign="top"><a id="a3b0c748a2347e6fbf9db640ebf552433"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_session.html#a3b0c748a2347e6fbf9db640ebf552433">getAutoClearAttributes</a> () const noexcept</td></tr>
<tr class="memdesc:a3b0c748a2347e6fbf9db640ebf552433"><td class="mdescLeft">&#160;</td><td class="mdescRight">getAutoClearAttributes <br /></td></tr>
<tr class="separator:a3b0c748a2347e6fbf9db640ebf552433"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af266c9e12b8bfbb89b2ba0618ebc7fd8"><td class="memItemLeft" align="right" valign="top"><a id="af266c9e12b8bfbb89b2ba0618ebc7fd8"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_session.html#af266c9e12b8bfbb89b2ba0618ebc7fd8">setAutoClearAttributes</a> (bool value) noexcept</td></tr>
<tr class="memdesc:af266c9e12b8bfbb89b2ba0618ebc7fd8"><td class="mdescLeft">&#160;</td><td class="mdescRight">setAutoClearAttributes <br /></td></tr>
<tr class="separator:af266c9e12b8bfbb89b2ba0618ebc7fd8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65cba5b1fba90e243099779ffa776a21"><td class="memItemLeft" align="right" valign="top"><a id="a65cba5b1fba90e243099779ffa776a21"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_session.html#a65cba5b1fba90e243099779ffa776a21">isExpired</a> ()</td></tr>
<tr class="memdesc:a65cba5b1fba90e243099779ffa776a21"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method returns true if the session is expired otherwise returns false. <br /></td></tr>
<tr class="separator:a65cba5b1fba90e243099779ffa776a21"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f8e0d9461d8d33792aa0e4d1c70d1e1"><td class="memItemLeft" align="right" valign="top"><a id="a5f8e0d9461d8d33792aa0e4d1c70d1e1"></a>
qint64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_session.html#a5f8e0d9461d8d33792aa0e4d1c70d1e1">getSessionTimeOut</a> () const noexcept</td></tr>
<tr class="memdesc:a5f8e0d9461d8d33792aa0e4d1c70d1e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the session timeout. <br /></td></tr>
<tr class="separator:a5f8e0d9461d8d33792aa0e4d1c70d1e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32a0365cda15d59165b3e205ac5102c9"><td class="memItemLeft" align="right" valign="top"><a id="a32a0365cda15d59165b3e205ac5102c9"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_session.html#a32a0365cda15d59165b3e205ac5102c9">setSessionTimeOut</a> (qint64 value)</td></tr>
<tr class="memdesc:a32a0365cda15d59165b3e205ac5102c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the current session timeout. If value is negative then it will be configured according to sessionExpirationTime of the CPPWeb.ini file. <br /></td></tr>
<tr class="separator:a32a0365cda15d59165b3e205ac5102c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a4d54f5003e07e218070a449c22a52c7c"><td class="memItemLeft" align="right" valign="top"><a id="a4d54f5003e07e218070a449c22a52c7c"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>HttpReadRequest</b></td></tr>
<tr class="separator:a4d54f5003e07e218070a449c22a52c7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5719d6ff12298e668b17796c87450d5b"><td class="memItemLeft" align="right" valign="top"><a id="a5719d6ff12298e668b17796c87450d5b"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>Request</b></td></tr>
<tr class="separator:a5719d6ff12298e668b17796c87450d5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The <a class="el" href="class_session.html" title="The Session class holds information about a client session. ">Session</a> class holds information about a client session. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a8c4e4bd7aa6d6fb16ab3dcdb5e892783"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c4e4bd7aa6d6fb16ab3dcdb5e892783">&#9670;&nbsp;</a></span>getAttribute()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QObject* Session::getAttribute </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns a session attribute given a name. </p>
<dl class="section warning"><dt>Warning</dt><dd>: If the parameter is not found, nullptr is returned. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/home/herik/CPPWebFramework/CPPWebFramework/cwf/<a class="el" href="session_8h_source.html">session.h</a></li>
<li>/home/herik/CPPWebFramework/CPPWebFramework/cwf/session.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon May 28 2018 11:09:09 for C++ Web Framework by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
